/*integer.hpp
#ifndef INTEGER_H
#define INTEGER_H

class Integer {
        private:
                int x;
        public:
                Integer(int x = 0);
                Integer operator + (const Integer &Int);//加法
                Integer operator - (const Integer &Int);//减法
                Integer operator - ();//求负
                Integer &operator ++ ();//前缀自增
                Integer operator ++ (int);//后缀自增
                Integer &operator -- ();//前缀自减
                Integer operator -- (int);//后缀自减
                void print();
};
#endif
 */

#include <iostream>

#include "integer.hpp"

using namespace std;

Integer::Integer(int x) { this->x = x; }
Integer Integer::operator+(const Integer &Int) { return Integer(x + Int.x); }
Integer Integer::operator-(const Integer &Int) { return Integer(x - Int.x); }
Integer Integer::operator-() { return Integer(-x); }
Integer &Integer::operator++() {
    x++;
    return *this;
}
Integer Integer::operator++(int) {
    Integer temp = *this;
    x++;
    return temp;
}
Integer &Integer::operator--() {
    x--;
    return *this;
}
Integer Integer::operator--(int) {
    Integer temp = *this;
    x--;
    return temp;
}
void Integer::print() { cout << x << endl; }
